load("@npm//:rollup/package_json.bzl", rollup = "bin")

rollup.rollup(
    name = "language-service",
    srcs = [
        "rollup.config.js",
        "//:node_modules/@angular/compiler-cli",
        "//:node_modules/@rollup/plugin-commonjs",
        "//:node_modules/@rollup/plugin-node-resolve",
        "//packages/language-service:tsconfig_build",
        "//packages/language-service/src",
        "//packages/language-service/src:ts_plugin.js",
        "//tools/bazel/rollup:path-plugin",
    ],
    outs = [
        "language-service.js",
    ],
    args = [
        "--format=amd",
        "--config=$(rootpath rollup.config.js)",
        "--input=packages/language-service/src/ts_plugin.js",
        "--file=packages/language-service/bundles/language-service.js",
        "--sourcemap=inline",
    ],
    visibility = ["//packages/language-service:__pkg__"],
)
